const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  // 关闭eslint检查
  lintOnSave: false,
  // 配置代理服务器解决跨域问题
  devServer: {
    proxy: {
      '/api': {
        // target:process.env.VUE_APP_BASE_URL,//http://localhost:9898/api
        target: 'http://localhost:9898', 
        ws: true,
        changeOrigin: true,
        pathRewrite:{
          '^/api':''  //重写路径，遇到/api就去掉
        }
      },
    }
  }
})
